<?php
namespace app\we\controller;
use think\Controller;
use app\we\sdk\Thinkwechat;


class Space extends Controller{


   
    public function index($openid=''){
      $fans=model('we/WeFans')->info($openid);
      
      if(request()->isPost()){
      	$data=input('post.');
      	$data['birthday']=strtotime($data['birthday']);
      	$res=db('WeFans')->where('openid',$openid)->update($data);
      	if ($res)$this->success('成功');


      }else{
      	$this->assign('openid',$openid);
      	$this->assign('fans',$fans);
        return $this->fetch();


      }

      
    }


}